<template>
  <h1>生命周期有6个</h1>
</template>

<script>
import { onMounted } from 'vue'
export default {
  setup () {
    // vue3都是先执行0
    onMounted(() => {
      console.log('生命周期执行了')
    })
    console.log('setup')
    return {}
  },
  created () {
    console.log('创建前')
  },
  mounted () {
    console.log('挂载后')
  }
}
</script>

<style lang="scss" scoped>
</style>
